Skip to content

ImageGen models support for --pull #3302

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
May 29, 2025
Merged

ImageGen models support for --pull #3302

merged 22 commits into from
May 29, 2025

Conversation

dkalinowski
Copy link
Collaborator

@dkalinowski dkalinowski commented May 21, 2025

🛠 Summary

CVS-166467

🧪 Checklist

  • Unit tests added.
  • The documentation updated.
  • Change follows security best practices.

@dkalinowski dkalinowski requested review from rasapala and atobiszei May 21, 2025 13:03
Comment on lines +78 to +80
std::string maxResolution = "";
std::string defaultResolution = "";
std::optional<uint32_t> maxNumberImagesPerPrompt;
Copy link
Collaborator

@atobiszei atobiszei May 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default = optional not empty?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By default it won't be present in graphpbtxt. And by default optional will be nullopt

node_options: {
[type.googleapis.com / mediapipe.ImageGenCalculatorOptions]: {
models_path: "./"
target_device: "CPU"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be better if we set this default in proto?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is specific parameter, that makes it easy for an admin to see where the models will be loaded. Default in proto is also good, as a fallback. I liked this approach and copied it from rerank and embeddings behavior. What do you think about it?

ASSERT_FALSE(imageGenerationGraphSettings.maxNumInferenceSteps.has_value());
ASSERT_TRUE(imageGenerationGraphSettings.pluginConfig.empty());
}

Copy link
Collaborator

@atobiszei atobiszei May 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing test for incorrect resolution?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests exists, in cli parser death tests. At this point the resolution will always be correct, otherwise cli parsing fails.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

negativeImageGenerationGraph_MaxResolutionWrongFormat

}
)";

// TODO: Remaining params
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To remove?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

};
int arg_count = 10;
EXPECT_EXIT(ovms::Config::instance().parse(arg_count, n_argv), ::testing::ExitedWithCode(OVMS_EX_USAGE),
"error parsing options: Argument ‘hello’ failed to parse");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default cxxopt behaviour - not needed test.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

};
int arg_count = 10;
EXPECT_EXIT(ovms::Config::instance().parse(arg_count, n_argv), ::testing::ExitedWithCode(OVMS_EX_USAGE),
"error parsing options: Argument ‘hello’ failed to parse");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default cxxopt behaviour - not needed test.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

@dkalinowski dkalinowski merged commit da8e03d into main May 29, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants